<%-- 
    Document   : editCourse
    Created on : 12-dec-2011, 12:24:28
    Author     : Vince
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Course Editor</title>
    </head>
    <body>
        <h1>Edit Course:</h1>
        <form action="CourseManager" method="post" name="editCourseForm">
        <TABLE class="noborder">
            ${editCourseMessage}
            <TR>
                <TD>Category:</TD><TD>
                    <select name="categories">
                        <option c:out value="${courseCategoryName}">${courseCategoryName}</option>
                        <c:forEach items="${categories}" var="current">
                        <option c:out value="${current}">${current}</option>
                        </c:forEach>
                    </select>
                </TD> 
            </TR>
            <TR>
                <input type="hidden" name="courseName" value="${courseName}"/>
                <TD>Course Name:</TD><TD><input type="text" name="courseNameView" value="${courseName}" disabled="disabled"/></TD> 
            </TR>
            <TR>
                <TD>Course Description:</TD><TD> <input type="text" name="courseDescription" value="${courseDescription}" /></TD>
            </TR>
            <TR>
                <TD>Teacher:</TD><TD>
                    <select name="teachers">
                        <option c:out value="${courseTeacherName[0]}">${courseTeacherName[3]} ${courseTeacherName[4]} ${courseTeacherName[5]}</option>
                        <c:forEach items="${teachers}" var="current2">
                        <option c:out value="${current2[0]}">${current2[3]} ${current2[4]} ${current2[5]}</option>
                        </c:forEach>
                    </select>
                </TD> 
            <TR>
                <%session.setAttribute("courseManager", "editCourse");%>
                <TD><input type="submit" name="submit" value="Save" /> </TD>
            </TR>
        </TABLE>
            <A HREF="Menu?redirection=back">Back</A>
    </body>
</html>
